//
//  NetworkUtils.h
//  youwei
//
//  Created by 王昭 on 2017/6/9.
//  Copyright © 2017年 xiaoningmeng. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NetworkUtil : NSObject


/**
 Get数据请求
 @param urlString       URL
 @param parameters      参数
 @param success         成功回调
 @param failure         失败回调
 */
+ (void)GET:(NSString *)urlString
 parameters:(id)parameters
    success:(void (^)(id responseObject,NSDictionary *dict))success
    failure:(void (^)(NSError *error,NSString *message))failure;

/**
 Post数据请求
 @param urlString       URL
 @param parameters      参数
 @param success         成功回调
 @param failure         失败回调
 */
+ (void)POST:(NSString *)urlString
  parameters:(id)parameters
     success:(void (^)(id responseObject,NSDictionary *dict))success
     failure:(void (^)(NSError *error,NSString *message))failure;

/**
 单张图片或多张图片上传
 @param urlString        URL
 @param parameters       参数
 @param imageArray       图片数组
 @param success          成功回调
 @param failure          失败回调
 */
+ (void)uploadPost:(NSString *)urlString
        parameters:(id)parameters
       UploadImage:(NSArray *)imageArray
           success:(void (^)(id responseObject))success
           failure:(void (^)(NSError *error,NSString *message))failure;

//文件上传
+ (void)uploadPost:(NSString *)urlString parameters:(id)parameters file:(NSData *)fildData success:(void (^)(id responseObject))success failure:(void (^)(NSError *error,NSString *message))failure;

/**
 文件上传

 @param urlString URL
 @param parameters 参数
 @param filePath 文件路径
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)uploadPost:(NSString *)urlString
        parameters:(id)parameters
    UploadFilePath:(NSString *)filePath
           success:(void (^)(id responseObject))success
           failure:(void (^)(NSError *error,NSString *message))failure;




/**
 实时监测网络变化
 @param netStatus        当前网络状态
 */
+ (void)ReachabilityStatus:(void (^)(id status))netStatus;





@end
